import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/views/Home.vue'
import Housing from '@/views/Housing.vue'
import Information from '@/views/Information.vue'
import My from '@/views/My.vue'
import User from '@/views/User.vue'
import Details from '@/views/Details.vue'


Vue.use(VueRouter)
const router =new VueRouter({
    routes:[
        {
            path:'/',
            component:Home,
            redirect:'/Home',
            children:[
               { path:'Home',
               component:Housing,
            },
            { path:'Housing',
               component:Housing,
            },
            { path:'Information',
               component:Information,
            },
            { path:'My',
               component:My,
            },
            { path:'User',
               component:User,
            },
            ]
        },
        {
            name:'Details',
            path:'/Details',
            component:Details
        }
    ]
})
export default router